//
//  CollectionViewDataModel.m
//  TextApplication
//
//  Created by dllo on 16/9/9.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "CollectionViewDataModel.h"
#import "CollectionViewItems.h"

@implementation CollectionViewDataModel

- (void)setValue:(id)value forKey:(NSString *)key {
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"items"]) {
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            CollectionViewItems *items = [CollectionViewItems modelWithDic:dic];
            [array addObject:items];
        }
        _items = array;
    }
}


@end
